<template>
    <div class="">
        <el-bread></el-bread>
        <!-- 表格 -->
        <el-table :data="memberlist" border style="width: 100%" class="table">
            <el-table-column label="用户编号" width="80" prop="uid">
            </el-table-column>
            <el-table-column label="昵称" prop="nickname">
            </el-table-column>
            <el-table-column label="手机号" prop="phone">
            </el-table-column>
            <el-table-column label="状态">
                <template slot-scope="item">
                    <div v-if="item.row.status == 1">
                        <el-button type="success" plain disabled>启用</el-button>
                    </div>
                    <div v-else>
                        <el-button type="danger" plain disabled>禁用</el-button>
                    </div>
                </template>

            </el-table-column>
            <el-table-column label="操作">
                <template slot-scope="item">
                    <div> <el-button type="primary" icon="el-icon-edit" size="mini"
                            @click="edit(item.row.uid)">编辑</el-button></div>

                </template>


            </el-table-column>
        </el-table>
        <v-dialog :isShow="isShow" ref="diaInfo" @cancel="cancel"></v-dialog>
    </div>
</template>
<script>
import vDialog from './dialog.vue'
import { mapGetters, mapActions } from 'vuex'
export default {

    computed: {
        ...mapGetters({

            memberlist: 'vip/getMember'
        })
    },
    components: { vDialog },
    data() {
        return {
            isShow: false,
        }
    },
    mounted() {
        this.getMember()
    },
    methods: {
        ...mapActions({
            getMember: 'vip/getMemberAction'
        }),
        edit(e) {
            console.log(e, '//////////');
            this.isShow = true
            this.$refs.diaInfo.lookup(e)
        },
        cancel(e) {
            this.isShow = e
        }
    }
}
</script>
<style scoped>
.btnInfo {
    margin: 10px 5px;
}

.table {
    margin-top: 20px;
}
</style>